package design.patterns.structural.decorator;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/4/4 17:04
 */
//装饰者模式
public class Client {
    public static void main(String[] args) {
        Coffee strongCoffee = new StrongCoffee();
        System.out.println("调料:"+ strongCoffee.getSeasoning() +"\t价格:"+strongCoffee.getPrice());
        strongCoffee = new Milk(strongCoffee);
        System.out.println("调料:"+ strongCoffee.getSeasoning() +"\t价格:"+strongCoffee.getPrice());
        strongCoffee = new Sugar(strongCoffee);
        System.out.println("调料:"+ strongCoffee.getSeasoning() +"\t价格:"+strongCoffee.getPrice());

    }
}
